<template>
  <!-- 底部宫格 -->
  <div class="E_grid_box">
    <!-- item 每日一练 -->
    <div class="grid_item">
      <!-- item left -->
      <div class="item_left">
        <div class="item_left_title">
          <strong>每日一练</strong>
          <span>免费</span>
        </div>
        <div class="item_left_state">今日未完成</div>
      </div>
      <!-- item right -->
      <div class="item_right">
        <svg class="lianxi_icon icon" aria-hidden="true">
          <use xlink:href="#icon-ziliao"></use>
        </svg>
      </div>
    </div>
    <!-- item 随机出题 -->
    <div class="grid_item">
      <!-- item left -->
      <div class="item_left">
        <div class="item_left_title">
          <strong>随机出题</strong>
          <span v-if="false">免费</span>
        </div>
        <div class="item_left_state">易错题型 智能推荐</div>
      </div>
      <!-- item right -->
      <div class="item_right">
        <svg class="back_icon icon" aria-hidden="true">
          <use xlink:href="#icon-yunyingguanli"></use>
        </svg>
      </div>
    </div>
    <!-- item 历年真题 -->
    <div class="grid_item" @click="handelRouter('overTopic')">
      <!-- item left -->
      <div class="item_left">
        <div class="item_left_title">
          <strong>历年真题</strong>
          <span v-if="true">免费</span>
        </div>
        <div class="item_left_state">往年真题 0/35</div>
      </div>
      <!-- item right -->
      <div class="item_right">
        <svg class="back_icon icon" aria-hidden="true">
          <use xlink:href="#icon-zhuanti"></use>
        </svg>
      </div>
    </div>
    <!-- item 模以试卷 -->
    <div class="grid_item">
      <!-- item left -->
      <div class="item_left">
        <div class="item_left_title">
          <strong>模以试卷</strong>
          <span v-if="true">免费</span>
        </div>
        <div class="item_left_state">实战演练 0/35</div>
      </div>
      <!-- item right -->
      <div class="item_right">
        <svg class="back_icon icon" aria-hidden="true">
          <use xlink:href="#icon-icon_xinyong_xianxing_jijin-"></use>
        </svg>
      </div>
    </div>
    <!-- item 章节练习 -->
    <div class="grid_item">
      <!-- item left -->
      <div class="item_left">
        <div class="item_left_title">
          <strong>章节练习</strong>
          <span v-if="false">免费</span>
        </div>
        <div class="item_left_state">专项练习 攻克难关</div>
      </div>
      <!-- item right -->
      <div class="item_right">
        <svg class="back_icon icon" aria-hidden="true">
          <use xlink:href="#icon-lianxi"></use>
        </svg>
      </div>
    </div>
    <!-- item 模考大赛 -->
    <div class="grid_item">
      <!-- item left -->
      <div class="item_left">
        <div class="item_left_title">
          <strong>模考大赛</strong>
          <span v-if="false">免费</span>
        </div>
        <div class="item_left_state">紧跟进度 验收成果</div>
      </div>
      <!-- item right -->
      <div class="item_right">
        <svg class="back_icon icon" aria-hidden="true">
          <use xlink:href="#icon-zaixianmokao"></use>
        </svg>
      </div>
    </div>
  </div>
</template>

<script>
import { useRouter } from "vue-router";
export default {
  setup() {
    // 页面跳转
    const router = useRouter();
    const handelRouter = (path) => {
      console.log(path);
      router.push(`/${path}`);
    };
    return { handelRouter };
  },
};
</script>

<style lang="less" scoped>
.icon {
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
.E_grid_box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  .grid_item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    height: 4.5rem;
    width: 48%;
    padding: 0 0.5rem;
    box-sizing: border-box;
    border-radius: 0.3rem;
    margin: 0.5rem 0;
    box-shadow: 0px 0px 7px 0px #eeeeee;
    .item_left {
      height: 59%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      .item_left_title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        strong {
          font-size: 0.9rem;
        }
        span {
          color: red;
          font-size: 0.7rem;
          padding: 0.05rem 0.4rem;
          margin-left: 0.5rem;
          background-color: #fee0e0;
          border-radius: 0.2rem;
        }
      }
      .item_left_state {
        color: #b0b0b0;
        font-size: 0.8rem;
      }
    }
  }
}
</style>
